package top.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import top.api.common.ResUlt;
import top.api.domain.dto.SysUserLoginDto;
import top.api.service.UserService;
import top.api.service.loginUserService;

@RestController
public class LoginController {
    @Autowired
    private UserService userService;

    @Autowired
    private loginUserService loginuserService;

    @PostMapping("/login")
    public ResUlt<Object> login(@RequestBody @Validated SysUserLoginDto sysUserLoginDto){
        return loginuserService.login(sysUserLoginDto);
    }

}
